package Servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import Info.DoctorI;
import Info.XiangmuI;
import Manage.DoctorM;
import Manage.XiangmuM;

public class UpdateDS extends HttpServlet{
	protected void service(HttpServletRequest request, HttpServletResponse response) 
			throws ServletException, IOException {
		request.setCharacterEncoding("utf-8");
		response.setContentType("text/html;charset=utf-8");
		String dnum = request.getParameter("dnum");
		String knum = request.getParameter("knum");
		String name = request.getParameter("name");
		String type = request.getParameter("type");
		String password = request.getParameter("password");
		DoctorI di = new DoctorI(dnum, knum, name, type, password);
		DoctorM dm = new DoctorM();
		dm.update(di);
		response.sendRedirect("LookDoctorS");
	}
}
